﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Schedule.aspx.cs" Inherits="Trangtrai.cauhinh.Schedule"
    MasterPageFile="~/SiteMaster.Master" %>

<%@ Register Assembly="DevExpress.Web.ASPxGridView.v11.1, Version=11.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v11.1, Version=11.1.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
    <center>
        <table width="960px" bgcolor="#7B96CE">
            <tr>
                <td align="center">
                    <dx:ASPxLabel ID="ASPxLabel1" runat="server" Text="DANH SÁCH CỬ ĂN" Font-Size="Large">
                    </dx:ASPxLabel>
                </td>
            </tr>
            <tr>
<<<<<<< .mine
            <td>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:TOM_MSConnectionString %>" 
                    
                    SelectCommand="SELECT [CUAN_NAME], [TIME], [NOTE], [CU_AN_ID] FROM [CU_AN]" 
                    DeleteCommand="DELETE FROM CU_AN WHERE CU_AN_ID=@CU_AN_ID" 
                    InsertCommand="INSERT INTO CU_AN(TIME, CUAN_NAME, NOTE) VALUES (@TIME,@CUAN_NAME,@NOTE)" 
                    
                    UpdateCommand="UPDATE CU_AN SET TIME =@TIME, CUAN_NAME =@CUAN_NAME, NOTE =@NOTE WHERE CU_AN_ID=@CU_AN_ID">
                    <DeleteParameters>
                        <asp:Parameter Name="CU_AN_ID" />
                    </DeleteParameters>
                    <InsertParameters>
                        <asp:Parameter Name="TIME" />
                        <asp:Parameter Name="CUAN_NAME" />
                        <asp:Parameter Name="NOTE" />
                    </InsertParameters>
                    <UpdateParameters>
                        <asp:Parameter Name="TIME" />
                        <asp:Parameter Name="CUAN_NAME" />
                        <asp:Parameter Name="NOTE" />
                        <asp:Parameter Name="CU_AN_ID" />
                    </UpdateParameters>
                </asp:SqlDataSource>
                <dx:ASPxGridView ID="ASPxGridView1" runat="server" Width="960px" 
                    AutoGenerateColumns="False" 
                    CssFilePath="~/App_Themes/Office2003Blue/{0}/styles.css" 
                    CssPostfix="Office2003Blue" DataSourceID="SqlDataSource1" 
                    KeyFieldName="CU_AN_ID">
                    <Columns>
                        <dx:GridViewDataTextColumn FieldName="CUAN_NAME" VisibleIndex="0" 
                            Caption="Tên cử">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataDateColumn FieldName="TIME" VisibleIndex="1" 
                            Caption="Thời gian">
                        </dx:GridViewDataDateColumn>
                        <dx:GridViewCommandColumn ButtonType="Image" Caption="Xóa" VisibleIndex="5">
                            <DeleteButton Visible="True">
                                <Image Url="~/Image/delete.PNG">
                                </Image>
                            </DeleteButton>
                            <ClearFilterButton Visible="True">
                            </ClearFilterButton>
                        </dx:GridViewCommandColumn>
                        <dx:GridViewCommandColumn ButtonType="Image" Caption="Sửa" VisibleIndex="4">
                            <EditButton Visible="True">
                                <Image Url="~/Image/modify.PNG">
                                </Image>
                            </EditButton>
                            <CancelButton>
                                <Image Url="~/Image/delete.PNG">
                                </Image>
                            </CancelButton>
                            <UpdateButton>
                                <Image Url="~/Image/save.PNG">
                                </Image>
                            </UpdateButton>
                            <ClearFilterButton Visible="True">
                            </ClearFilterButton>
                        </dx:GridViewCommandColumn>
                        <dx:GridViewCommandColumn ButtonType="Image" Caption="Thêm" VisibleIndex="3">
                            <NewButton Visible="True">
                                <Image Url="~/Image/add.png">
                                </Image>
                            </NewButton>
                            <CancelButton>
                                <Image Url="~/Image/delete.PNG">
                                </Image>
                            </CancelButton>
                            <UpdateButton>
                                <Image Url="~/Image/save.PNG">
                                </Image>
                            </UpdateButton>
                            <ClearFilterButton Visible="True">
                            </ClearFilterButton>
                        </dx:GridViewCommandColumn>
                        <dx:GridViewDataTextColumn FieldName="NOTE" VisibleIndex="2" Caption="Ghi chú">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="CU_AN_ID" ReadOnly="True" 
                            VisibleIndex="6" Visible="false">
                            <EditFormSettings Visible="False" />
                        </dx:GridViewDataTextColumn>
                    </Columns>
                    <Images SpriteCssFilePath="~/App_Themes/Office2003Blue/{0}/sprite.css">
                        <LoadingPanelOnStatusBar Url="~/App_Themes/Office2003Blue/GridView/gvLoadingOnStatusBar.gif">
                        </LoadingPanelOnStatusBar>
                        <LoadingPanel Url="~/App_Themes/Office2003Blue/GridView/Loading.gif">
                        </LoadingPanel>
                    </Images>
                    <ImagesFilterControl>
                        <LoadingPanel Url="~/App_Themes/Office2003Blue/Editors/Loading.gif">
                        </LoadingPanel>
                    </ImagesFilterControl>
                    <Styles CssFilePath="~/App_Themes/Office2003Blue/{0}/styles.css" 
                        CssPostfix="Office2003Blue">
                        <Header ImageSpacing="5px" SortingImageSpacing="5px">
                        </Header>
                        <LoadingPanel ImageSpacing="10px">
                        </LoadingPanel>
                    </Styles>
                    <SettingsEditing Mode="PopupEditForm" PopupEditFormWidth="600px" PopupEditFormHorizontalAlign="Center"/>
                    <StylesEditors>
                        <ProgressBar Height="25px">
                        </ProgressBar>
                    </StylesEditors>
                </dx:ASPxGridView>
            </td>
=======
                <td>
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:TOM_MSConnectionString %>"
                        SelectCommand="SELECT CUAN_NAME, CU_AN_TIME, NOTE, CU_AN_ID FROM CU_AN" DeleteCommand="DELETE FROM CU_AN WHERE CU_AN_ID=@CU_AN_ID"
                        InsertCommand="insertToCalandCuan"
                        
                        UpdateCommand="UPDATE CU_AN SET CU_AN_TIME =@CU_AN_TIME, CUAN_NAME =@CUAN_NAME, NOTE =@NOTE WHERE CU_AN_ID=@CU_AN_ID" 
                        InsertCommandType="StoredProcedure">
                        <DeleteParameters>
                            <asp:Parameter Name="CU_AN_ID" />
                        </DeleteParameters>
                        <InsertParameters>
                            <asp:Parameter Name="CU_AN_ID"/>
                            <asp:Parameter Name="CU_AN_TIME"/>
                            <asp:Parameter Name="CUAN_NAME" />
                            <asp:Parameter Name="NOTE" />
                        </InsertParameters>
                        <UpdateParameters>
                            <asp:Parameter Name="CU_AN_TIME" />
                            <asp:Parameter Name="CUAN_NAME" />
                            <asp:Parameter Name="NOTE" />
                            <asp:Parameter Name="CU_AN_ID" />
                        </UpdateParameters>
                    </asp:SqlDataSource>
                    <dx:ASPxGridView ID="ASPxGridView1" runat="server" Width="960px" AutoGenerateColumns="False"
                        CssFilePath="~/App_Themes/Office2003Blue/{0}/styles.css" CssPostfix="Office2003Blue"
                        DataSourceID="SqlDataSource1" KeyFieldName="CU_AN_ID">
                        <Columns>
                            <dx:GridViewDataTextColumn FieldName="CUAN_NAME" VisibleIndex="0" Caption="Tên cử">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="CU_AN_TIME" VisibleIndex="1" Caption="Thời gian">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewCommandColumn ButtonType="Image" Caption="Xóa" VisibleIndex="5">
                                <DeleteButton Visible="True">
                                    <Image Url="~/Image/delete.PNG">
                                    </Image>
                                </DeleteButton>
                                <ClearFilterButton Visible="True">
                                </ClearFilterButton>
                            </dx:GridViewCommandColumn>
                            <dx:GridViewCommandColumn ButtonType="Image" Caption="Sửa" VisibleIndex="4">
                                <EditButton Visible="True">
                                    <Image Url="~/Image/modify.PNG">
                                    </Image>
                                </EditButton>
                                <CancelButton>
                                    <Image Url="~/Image/delete.PNG">
                                    </Image>
                                </CancelButton>
                                <UpdateButton>
                                    <Image Url="~/Image/save.PNG">
                                    </Image>
                                </UpdateButton>
                                <ClearFilterButton Visible="True">
                                </ClearFilterButton>
                            </dx:GridViewCommandColumn>
                            <dx:GridViewCommandColumn ButtonType="Image" Caption="Thêm" VisibleIndex="3">
                                <NewButton Visible="True">
                                    <Image Url="~/Image/add.png">
                                    </Image>
                                </NewButton>
                                <CancelButton>
                                    <Image Url="~/Image/delete.PNG">
                                    </Image>
                                </CancelButton>
                                <UpdateButton>
                                    <Image Url="~/Image/save.PNG">
                                    </Image>
                                </UpdateButton>
                                <ClearFilterButton Visible="True">
                                </ClearFilterButton>
                            </dx:GridViewCommandColumn>
                            <dx:GridViewDataTextColumn FieldName="NOTE" VisibleIndex="2" Caption="Ghi chú">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="CU_AN_ID" ReadOnly="True" VisibleIndex="6"
                                Visible="false">
                                <EditFormSettings Visible="False" />
                            </dx:GridViewDataTextColumn>
                        </Columns>
                        <Images SpriteCssFilePath="~/App_Themes/Office2003Blue/{0}/sprite.css">
                            <LoadingPanelOnStatusBar Url="~/App_Themes/Office2003Blue/GridView/gvLoadingOnStatusBar.gif">
                            </LoadingPanelOnStatusBar>
                            <LoadingPanel Url="~/App_Themes/Office2003Blue/GridView/Loading.gif">
                            </LoadingPanel>
                        </Images>
                        <ImagesFilterControl>
                            <LoadingPanel Url="~/App_Themes/Office2003Blue/Editors/Loading.gif">
                            </LoadingPanel>
                        </ImagesFilterControl>
                        <Styles CssFilePath="~/App_Themes/Office2003Blue/{0}/styles.css" CssPostfix="Office2003Blue">
                            <Header ImageSpacing="5px" SortingImageSpacing="5px">
                            </Header>
                            <LoadingPanel ImageSpacing="10px">
                            </LoadingPanel>
                        </Styles>
                        <StylesEditors>
                            <ProgressBar Height="25px">
                            </ProgressBar>
                        </StylesEditors>                        
                    </dx:ASPxGridView>
                </td>
>>>>>>> .r115
            </tr>
            <tr>
                <td>
                    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:TOM_MSConnectionString %>" 
                        
                        SelectCommand="SELECT CU_AN.CU_AN_TIME, CALENDAR.DOVO_TIME, CALENDAR.PH_TIME, CALENDAR.KYTHUAT_TIME, CALENDAR.KIEMSOAT_TIME, CALENDAR.CU_AN_NAME FROM CALENDAR INNER JOIN CU_AN ON CALENDAR.CU_AN_NAME = CU_AN.CUAN_NAME">
                    </asp:SqlDataSource>
                    <dx:ASPxGridView ID="schedueGrid" runat="server" Width="960px" AutoGenerateColumns="False"
                        CssFilePath="~/App_Themes/Office2003Blue/{0}/styles.css" KeyFieldName="CU_AN_NAME" 
                        CssPostfix="Office2003Blue" DataSourceID="SqlDataSource2">
                        <Styles CssFilePath="~/App_Themes/Office2003Blue/{0}/styles.css" CssPostfix="Office2003Blue">
                            <Header ImageSpacing="5px" SortingImageSpacing="5px">
                            </Header>
                            <LoadingPanel ImageSpacing="10px">
                            </LoadingPanel>
                        </Styles>
                        <ImagesFilterControl>
                            <LoadingPanel Url="~/App_Themes/Office2003Blue/Editors/Loading.gif">
                            </LoadingPanel>
                        </ImagesFilterControl>
                        <Images SpriteCssFilePath="~/App_Themes/Office2003Blue/{0}/sprite.css">
                            <LoadingPanelOnStatusBar Url="~/App_Themes/Office2003Blue/GridView/gvLoadingOnStatusBar.gif">
                            </LoadingPanelOnStatusBar>
                            <LoadingPanel Url="~/App_Themes/Office2003Blue/GridView/Loading.gif">
                            </LoadingPanel>
                        </Images>
                        <Columns>
                            <dx:GridViewCommandColumn ButtonType="Image" Caption="Sửa" VisibleIndex="6">
                                <EditButton Visible="True">
                                    <Image Url="~/Image/modify.PNG">
                                    </Image>
                                </EditButton>
                                <CancelButton>
                                    <Image Url="~/Image/delete.PNG">
                                    </Image>
                                </CancelButton>
                                <UpdateButton>
                                    <Image Url="~/Image/save.PNG">
                                    </Image>
                                </UpdateButton>
                                <ClearFilterButton Visible="True">
                                </ClearFilterButton>
                            </dx:GridViewCommandColumn>
                            <dx:GridViewDataTextColumn Caption="Thời gian đua ra kế hoạch cho ăn của kiểm xoat viên" 
                                VisibleIndex="5" FieldName="KIEMSOAT_TIME">
                                <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="Thời gian đua ra kế hoạch cho ăn Kỹ Thuật" FieldName="KYTHUAT_TIME"
                                VisibleIndex="4">
                                <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="Thời gian báo cáo đo PH" VisibleIndex="3" 
                                FieldName="PH_TIME">
                                <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="Thời gian báo cáo vó" VisibleIndex="2" 
                                FieldName="DOVO_TIME">
                                <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="Tên cử" 
                                VisibleIndex="0" FieldName="CU_AN_NAME" ReadOnly="true">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="Thời gian cho ăn" FieldName="CU_AN_TIME" VisibleIndex="1" ReadOnly="true">
                                <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                            </dx:GridViewDataTextColumn>
                        </Columns>
                        <StylesEditors>
                            <ProgressBar Height="25px">
                            </ProgressBar>
                        </StylesEditors>
                    </dx:ASPxGridView>
                </td>
            </tr>
        </table>
    </center>
</asp:Content>
